var app = (require('express'))();

app.get('/hello.txt', function(req, res){
  var body = 'Hello World';
  res.setHeader('Content-Type', 'text/plain');
  res.setHeader('Content-Length', body.length);
  res.end(body);
});

app.get('/', function(req, res){
  //res.send('hello world from csser.com!');
  //res.render('.csser.com 字符串', { options: 'here' });
  res.render('index', {  
	  title: 'Express'  
  });  
});
app.get('/404', function(req, res){
  throw new NotFound;
});

app.get('/500', function(req, res){
  throw new Error('keyboard cat!');
});

//app.get('/word', function(req, res){
  //res.send('hello world from csser.com!');
//});
app.listen(3000);

